﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<PrimeraAFantasyFootballl.Models.Liga>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Ligas
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Ligas</h2>

    <table>
        <tr>
            <th></th>
            <th>
                ID
            </th>
            <th>
                Nombre
            </th>
            <th>
                Creador
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>              
                <%: Html.ActionLink("Detalles", "Details", new { id=item.LigaID })%>         
            </td>
            <td>
                <%: item.LigaID %>
            </td>
            <td>
                <%: item.Nombre %>
            </td>
            <td>
                <%: item.Usuario.Username %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Crear Liga", "Create") %>
    </p>

</asp:Content>

